package com.aispeech.asr.clib.post;

import com.sun.jna.Library;

public interface IPost extends Library {
    long lasr_post_process_static_dependency_init(String configPath, String asrppBinPath, String ipcPath);

    long lasr_post_process_engine_new(long pPostCfg, int needAsrpp);

    /*
     * env_str: 配置的字符串
     *          支持json格式(推荐),例如: {"punctuation": {"env1": 1, "env2": "true"}};
     *          支持非json格式,例如: punctuation.env1=1&punctuation.env2=true
     *          目前支持的参数有 {"punctuation":{"use_period_split":1}} 或者 punctuation.use_period_split=1
     */
    PostResultStruct.ByReference lasr_post_process_engine_feed_align(
            long pPostIns,
            AlignInfoStruct alignInfo,
            String env
    );

    /*
     * env_str: 配置的字符串
     *          支持json格式(推荐),例如: {"punctuation": {"env1": 1, "env2": "true"}};
     *          支持非json格式,例如: punctuation.env1=1&punctuation.env2=true
     *          目前支持的参数有 {"punctuation":{"use_period_split":1}} 或者 punctuation.use_period_split=1
     */
    AsrppResultStruct lasr_asrpp_process_engine_feed_align(
            long pPostIns,
            byte[] audioData,
            int dataSize
    );

    void lasr_post_process_engine_delete(long pPostIns);

    void lasr_post_process_static_dependency_destroy(long pPostCfg);
}
